{% extends "master.html" %}
{% block subtitle %} - 店铺管理 - 店铺详情{% endblock %}


{% block main %}
<div class="container">
    <div class="row">
        <ol class="breadcrumb">
          <li><a href="{{url_for('bpMas.view')}}">基础信息</a></li>
          <li><a href="{{url_for('bpShop.view')}}">店铺管理</a></li>
          <li class="active">店铺详情</li>
        </ol>
    </div>
    <div class="row">
        <ul class="nav nav-tabs">
          <li class="active"><a href="#">供应商详情</a></li>
          <li><a href="{{url_for('.view',action='viewLog',id=obj.id)}}">日志记录</a></li>
        </ul>
    </div>
    <div class="row">
        <div class="btn-toolbar pull-right">
            {% if obj.editable() %}
                <div class="btn-group"><a type="button" class="btn btn-primary" href="{{url_for('.view',action='update',id=obj.id)}}">{{BTN_UPDATE}}</a></div>
            {% endif %}
            {% if obj.deletable() %}
                <div class="btn-group"><a class="btn btn-danger" href="{{url_for('.view',action='delete',id=obj.id)}}">{{BTN_DELETE}}</a></div>
            {% endif %}
        </div>
    </div>
    <div class="row">
        <fieldset>
            <legend>店铺基本信息</legend>
            <div class="col-md-4">
                <h4>店铺编号</h4>
                <p>{{obj.no}}&nbsp;</p>
                <h4>店铺简称</h4>
                <p>{{obj.shortName}}&nbsp;</p>
                <h4>店铺全称</h4>
                <p>{{obj.name}}</p>
            </div>
            <div class="col-md-4">
                <h4>地址</h4>
                <p>{{obj.province|f}}{{obj.city|f}}{{obj.address|f}}&nbsp;</p>
                <h4>成立资金</h4>
                <p>{{obj.fund|f}}&nbsp;</p>
                <h4>法人代表</h4>
                <p>{{obj.legalPerson|f}}&nbsp;</p>
            </div>
            <div class="col-md-4">
                <h4>店铺类型</h4>
                <p>{{spobj.shopType|ss(c='SPTP')}}&nbsp;</p>
                <h4>销售方式</h4>
                <p>{{spobj.saleType|ss(c='SPSLTP')}}&nbsp;</p>
                <h4>备注</h4>
                <p>{{obj.remark|f}}&nbsp;</p>                
            </div>
        </fieldset>
        <br />
        <fieldset>
            <legend>店铺账户信息</legend>
            {% for aobj in spobj.accounts %}
                <div>
                    <div class="col-md-4">
                        <h4>账户名称</h4>
                        <p>{{aobj.name|f}}&nbsp;</p>
                        <h4>账户号码</h4>
                        <p>{{aobj.code|f}}&nbsp;</p>
                    </div>
                    <div class="col-md-4">
                        <h4>账户拥有人</h4>
                        <p>{{aobj.owner|f}}&nbsp;</p>
                        <h4>账户货币</h4>
                        <p>{{aobj.currency|f}}&nbsp;</p>
                    </div>
                    <div class="col-md-4">
                        <h4>支付方式</h4>
                        <p>{{aobj.paytype|f}}&nbsp;</p>
                        <h4>余额</h4>
                        <p>{{aobj.amount}}&nbsp;</p>                        
                    </div>
                </div>
                <hr />
            {% endfor %}
        </fieldset>
        <br />
        <fieldset>
            <legend>店铺功能信息</legend>
            <div class="col-md-12">
                <ul>
                    {% if spobj.canSale == 0 %}
                        <li>销售产品模块</li>
                    {% endif %}
                    {% if spobj.canPurchase == 0 %}
                        <li>采购产品模块</li>
                    {% endif %}
                    {% if spobj.canGetWarehouse == 0 %}
                        <li>仓存模块</li>
                    {% endif %}
                    {% if spobj.canUpdateProduct == 0 %}
                        <li>更新商品模块</li>
                    {% endif %}
                    {% if spobj.canUpdateOfficer == 0 %}
                        <li>更新人员模块</li>
                    {% endif %}
                </ul>                
            </div>
        </fieldset>
        <br />
        <fieldset>
            <legend>附件</legend>
            {{mymacros.render_preview_all_attachment(obj.attachment)}}
        </fieldset>
        {{mymacros.render_system_info(obj)}}
    </div>
                               
</div>
{% endblock %}